﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="EditProfile.aspx.vb" Inherits="BooksReviewApp.EditProfile" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h2>
        Edit your Profile</h2>
    <asp:Accordion ID="AccordionProfile" CssClass="accordion" HeaderCssClass="accordionHeader"
        HeaderSelectedCssClass="accordionHeaderSelected" ContentCssClass="accordionContent"
        runat="server">
        <Panes>
            <asp:AccordionPane ID="AccordionPanePI" runat="server" ContentCssClass="" HeaderCssClass="">
                <Header>
                    <h3>
                        Personal Information</h3>
                    <br />
                    <br />
                </Header>
                <Content>
                    <table>
                        <tr>
                            <td>
                                First Name
                            </td>
                            <td>
                                <asp:TextBox ID="tb_FirstName" runat="server"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="tb_FirstName"
                                    CssClass="field-validation-error" ErrorMessage="*"></asp:RequiredFieldValidator>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Last Name
                            </td>
                            <td>
                                <asp:TextBox ID="tb_LastName" runat="server"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="tb_LastName"
                                    CssClass="field-validation-error" ErrorMessage="*"></asp:RequiredFieldValidator>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Date of Birth
                            </td>
                            <td>
                                <asp:TextBox ID="tb_DateOfBirth" runat="server"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="tb_DateOfBirth"
                                    CssClass="field-validation-error" ErrorMessage="*"></asp:RequiredFieldValidator>
                                <asp:CalendarExtender ID="tb_DateOfBirth_CalendarExtender" runat="server" Enabled="True"
                                    TargetControlID="tb_DateOfBirth" DefaultView="Years" Format="dd-MM-yyyy">
                                </asp:CalendarExtender>
                            </td>
                        </tr>
                    </table>
                </Content>
            </asp:AccordionPane>
            <asp:AccordionPane ID="AccordionPaneAboutMe" runat="server" ContentCssClass="" HeaderCssClass="">
                <Header>
                    <h3>
                        About me</h3>
                    <br />
                    <br />
                </Header>
                <Content>
                    <table>
                        <tr>
                            <td>
                                About me
                            </td>
                            <td>
                                <asp:TextBox ID="tb_Description" runat="server" TextMode="MultiLine"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="tb_Description"
                                    CssClass="field-validation-error" ErrorMessage="*"></asp:RequiredFieldValidator>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Town
                            </td>
                            <td>
                                <asp:TextBox ID="tb_Location" runat="server" TextMode="SingleLine"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ControlToValidate="tb_Location"
                                    CssClass="field-validation-error" ErrorMessage="*"></asp:RequiredFieldValidator>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Favorite Language
                            </td>
                            <td>
                                <asp:CheckBoxList ID="cbl_Languages" runat="server" DataSourceID="SqlDataSource2" DataTextField="Language"
                                    DataValueField="ID" RepeatDirection="Horizontal" RepeatColumns="4">
                                </asp:CheckBoxList>
                                <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:BooksReviewDBConnectionString1 %>"
                                    ProviderName="<%$ ConnectionStrings:BooksReviewDBConnectionString1.ProviderName %>" SelectCommand="SELECT * FROM [CodingLanguages]">
                                </asp:SqlDataSource>
                            </td>
                        </tr>
                    </table>
                </Content>
            </asp:AccordionPane>
            <asp:AccordionPane ID="AccordionPanePicture" runat="server" ContentCssClass="" HeaderCssClass="">
                <Header>
                    <h3>
                        Add Picture</h3>
                    <br />
                    <br />
                </Header>
                <Content>
                    <table>
                        <tr>
                            <td>
                                Picture
                            </td>
                            <td>
                                <asp:FileUpload ID="f_Picture" runat="server" />
                            </td>
                        </tr>
                    </table>
                </Content>
            </asp:AccordionPane>
        </Panes>
    </asp:Accordion>
    <br />
    <br />
    <asp:Button ID="btn_SaveProfile" runat="server" Text="Save Profile" CssClass="m-btn blue" />
</asp:Content>
